package com.wangjie.controller;

import com.wangjie.response.QueryResponseResult;
import com.wangjie.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author jieshao
 * @date 2021/5/21 17:12
 */
@Controller
public class EmployeeController {
    @Autowired
    private EmployeeService employeeService;

    @ResponseBody
    @GetMapping(value = "/list/{page}/{size}")
    public QueryResponseResult selectByPage(@PathVariable("page") int page, @PathVariable("size") int size) {
        return employeeService.selectByPage(page, size);
    }
}